import request from '@/utils/request'

export function getAddressList(params) {
  return request({
    url: 'gem/address',
    method: 'GET',
    params
  })
}

export function getAreaList(params) {
  return request({
    url: 'gem/address/area-list',
    method: 'GET',
    params
  })
}

export function getDefaultAddress(params) {
  return request({
    url: 'gem/address/default-address',
    method: 'GET',
    params
  })
}

export function addrDetail(params) {
  return request({
    url: 'gem/address/address-detail',
    method: 'GET',
    params
  })
}

export function addAddress(params) {
  return request({
    url: 'gem/address/add-address',
    method: 'POST',
    data: params
  })
}

export function editAddress(params) {
  return request({
    url: 'gem/address/edit-address',
    method: 'PUT',
    data: params
  })
}

export function deleteAddress(params) {
  return request({
    url: 'gem/address/delete-address',
    method: 'DELETE',
    params
  })
}
